﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

namespace Xylee.Common
{
    /// <summary>
    /// Portals are defined as view instances that 
    /// may handle children or full application views 
    /// that can be transfered to, notified and or 
    /// destroyed. Visual attributes that are consistent 
    /// for all portals are defined in this interface.
    /// </summary>
    public interface IPortal
    {
        /// <summary>
        /// Each portal will have a header to which 
        /// displays the name of the portal being 
        /// viewed or opened to the user.
        /// </summary>
        string Title
        {
            get;
        }

        /// <summary>
        /// Each portal is persisting a particular 
        /// list of concepts. A concept is simply a 
        /// name that identifies a specific topic or 
        /// category that pertains to an information 
        /// subject line. Each concept listed is 
        /// should be separated by a semi-colon.
        /// <example>japanese;linguistics;learning</example>
        /// </summary>
        string Concepts
        {
            get;
        }

        /// <summary>
        /// Clears the layout of the portal by either 
        /// removing, resizing or minimizing view content 
        /// within the entire portal.
        /// </summary>
        void ClearLayout();

        /// <summary>
        /// Sets the layout according to the exist and 
        /// persistence level values. This will allow 
        /// a given context to be set immediately.
        /// </summary>
        /// <param name="exist"><seealso cref="ExistLevel"/> used in accessibility..</param>
        /// <param name="persist"><seealso cref="PersistLevel"/> used in availability.</param>
        void SetupLayout(ExistLevel exist, PersistLevel persist);

        /// <summary>
        /// Sets the layout according to its default 
        /// extensions and/or cached or saved layout 
        /// by loading the portal with the necessary 
        /// views and arranging each persist and exist 
        /// levels of the views that are of immediate 
        /// importance to the portal.
        /// </summary>
        void SetupDefaultLayout();
    }
}
